package org.example.model;

import org.example.command.OrderCmd;
import org.example.engine.RbCmd;

import java.util.function.Consumer;

public interface OrderBucket extends Comparable<OrderBucket>{

    void put(Order order);

    Order remove(long oid);

    long match(long volumn, RbCmd command, Consumer<Order> removeOrderCall );

    long getPrice();

    void setPrice(long price);

    long getVolumn();

    default int compareTo(OrderBucket order) {
        return Long.compare(this.getPrice(), order.getPrice());
    }

    boolean isEmpty();
}
